# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=libunistring
pkgver=0.9.10
pkgrel=0
pkgdesc="Library for manipulating Unicode strings and C strings"
url="https://www.gnu.org/software/libunistring/"
arch="all"
options="!check"  # Tests fail with musl locale library
license="GPL-2.0+ OR LGPL-3.0+"
depends=""
depends_dev=""
makedepends="$depends_dev"
install=""
subpackages="$pkgname-dev $pkgname-doc"
source="https://ftp.gnu.org/gnu/libunistring/libunistring-$pkgver.tar.xz"

build() {
	cd "$builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--localstatedir=/var \
		--disable-static
	make
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install
	rm -f "$pkgdir"/usr/lib/charset.alias
}

sha512sums="01dcab6e05ea4c33572bf96cc0558bcffbfc0e62fc86410cef06c1597a0073d5750525fe2dee4fdb39c9bd704557fcbab864f9645958108a2e07950bc539fe54  libunistring-0.9.10.tar.xz"
